package com.union.core.family.service;

import org.apache.log4j.Logger;

import com.union.core.family.model.Family_Personnel;
import com.union.core.family.model.dao.Family_PersonnelDao;
import com.union.core.family.model.dao.impl.Family_PersonnelDaoImpl;

public class Family_PersonnelService {
	 private Family_PersonnelDao family_PersonnelDaoImpl;
	 private static Logger log = Logger.getLogger(Family_PersonnelService.class.getName());
	 public Family_PersonnelService(){
		 family_PersonnelDaoImpl = new Family_PersonnelDaoImpl();
			
	  }
	 
	 
	 
	 public void add(Family_Personnel family_Personnel){
		 family_PersonnelDaoImpl.add(family_Personnel);
		 log.info("PLAT:添加家庭人员信息：" );
	 }
	 
	 public boolean edit(Family_Personnel family_Personnel){
		  boolean b = false;
		  b = family_PersonnelDaoImpl.edit(family_Personnel);
		  log.info("PLAT:修改家庭人员信息："+ family_Personnel.getId());
		  return b;
	 }
	 public Family_Personnel query(int id){
		 Family_Personnel family_Personnel = family_PersonnelDaoImpl.query(id);
		 log.info("PLAT:查询家庭人员信息：" + family_Personnel.getId());
		 return family_Personnel;
	 }
	 public boolean delete(int id){
		 boolean b =false;
		b =  family_PersonnelDaoImpl.delete(id);
		log.info("删除家庭人员信息：id" + id);
		return b;
	 }
}
